3.25 \(\int \frac{A+B x+C x^2}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=211 \[ \frac{\left (\frac{2 A c-b C}{\sqrt{b^2-4 a c}}+C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (C-\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \sqrt{c} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{B \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c}} \]

[Out]

((C + (2*A*c - b*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[
b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((C - (2*A*c - b
*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/
(Sqrt[2]*Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]) - (B*ArcTanh[(b + 2*c*x^2)/Sqrt[b^
2 - 4*a*c]])/Sqrt[b^2 - 4*a*c]

_______________________________________________________________________________________

Rubi [A]  time = 0.597401, antiderivative size = 211, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.28 \[ \frac{\left (\frac{2 A c-b C}{\sqrt{b^2-4 a c}}+C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (C-\frac{2 A c-b C}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \sqrt{c} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{B \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x + C*x^2)/(a + b*x^2 + c*x^4),x]

[Out]

((C + (2*A*c - b*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[
b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((C - (2*A*c - b
*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/
(Sqrt[2]*Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]) - (B*ArcTanh[(b + 2*c*x^2)/Sqrt[b^
2 - 4*a*c]])/Sqrt[b^2 - 4*a*c]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 53.7049, size = 221, normalized size = 1.05 \[ - \frac{B \operatorname{atanh}{\left (\frac{b + 2 c x^{2}}{\sqrt{- 4 a c + b^{2}}} \right )}}{\sqrt{- 4 a c + b^{2}}} - \frac{\sqrt{2} \left (2 A c - C b - C \sqrt{- 4 a c + b^{2}}\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{2 \sqrt{c} \sqrt{b + \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} + \frac{\sqrt{2} \left (2 A c - C b + C \sqrt{- 4 a c + b^{2}}\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{2 \sqrt{c} \sqrt{b - \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((C*x**2+B*x+A)/(c*x**4+b*x**2+a),x)

[Out]

-B*atanh((b + 2*c*x**2)/sqrt(-4*a*c + b**2))/sqrt(-4*a*c + b**2) - sqrt(2)*(2*A*
c - C*b - C*sqrt(-4*a*c + b**2))*atan(sqrt(2)*sqrt(c)*x/sqrt(b + sqrt(-4*a*c + b
**2)))/(2*sqrt(c)*sqrt(b + sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2)) + sqrt(2)*(
2*A*c - C*b + C*sqrt(-4*a*c + b**2))*atan(sqrt(2)*sqrt(c)*x/sqrt(b - sqrt(-4*a*c
 + b**2)))/(2*sqrt(c)*sqrt(b - sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.402995, size = 234, normalized size = 1.11 \[ \frac{\frac{\sqrt{2} \left (C \left (\sqrt{b^2-4 a c}-b\right )+2 A c\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{2} \left (C \left (\sqrt{b^2-4 a c}+b\right )-2 A c\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{c} \sqrt{\sqrt{b^2-4 a c}+b}}+B \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )-B \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{2 \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x + C*x^2)/(a + b*x^2 + c*x^4),x]

[Out]

((Sqrt[2]*(2*A*c + (-b + Sqrt[b^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b
 - Sqrt[b^2 - 4*a*c]]])/(Sqrt[c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + (Sqrt[2]*(-2*A*c
 + (b + Sqrt[b^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a
*c]]])/(Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]) + B*Log[-b + Sqrt[b^2 - 4*a*c] - 2*
c*x^2] - B*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(2*Sqrt[b^2 - 4*a*c])

_______________________________________________________________________________________

Maple [B]  time = 0.025, size = 616, normalized size = 2.9 \[{\frac{B}{8\,ac-2\,{b}^{2}}\sqrt{-4\,ac+{b}^{2}}\ln \left ( 2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}+b \right ) }+{\frac{c\sqrt{2}A}{4\,ac-{b}^{2}}\sqrt{-4\,ac+{b}^{2}}\arctan \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}+2\,{\frac{c\sqrt{2}Ca}{ \left ( 4\,ac-{b}^{2} \right ) \sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}\arctan \left ({\frac{cx\sqrt{2}}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}} \right ) }-{\frac{\sqrt{2}C{b}^{2}}{8\,ac-2\,{b}^{2}}\arctan \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}-{\frac{b\sqrt{2}C}{8\,ac-2\,{b}^{2}}\sqrt{-4\,ac+{b}^{2}}\arctan \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}-{\frac{B}{8\,ac-2\,{b}^{2}}\sqrt{-4\,ac+{b}^{2}}\ln \left ( -2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}-b \right ) }+{\frac{c\sqrt{2}A}{4\,ac-{b}^{2}}\sqrt{-4\,ac+{b}^{2}}{\it Artanh} \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}-2\,{\frac{c\sqrt{2}Ca}{ \left ( 4\,ac-{b}^{2} \right ) \sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}{\it Artanh} \left ({\frac{cx\sqrt{2}}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}} \right ) }+{\frac{\sqrt{2}C{b}^{2}}{8\,ac-2\,{b}^{2}}{\it Artanh} \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}-{\frac{b\sqrt{2}C}{8\,ac-2\,{b}^{2}}\sqrt{-4\,ac+{b}^{2}}{\it Artanh} \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((C*x^2+B*x+A)/(c*x^4+b*x^2+a),x)

[Out]

1/2*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1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2
))*c)^(1/2))*b*C

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{C x^{2} + B x + A}{c x^{4} + b x^{2} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(c*x^4 + b*x^2 + a),x, algorithm="maxima")

[Out]

integrate((C*x^2 + B*x + A)/(c*x^4 + b*x^2 + a), x)

_______________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(c*x^4 + b*x^2 + a),x, algorithm="fricas")

[Out]

Exception raised: NotImplementedError

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x**2+B*x+A)/(c*x**4+b*x**2+a),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 1.06884, size = 1, normalized size = 0. \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(c*x^4 + b*x^2 + a),x, algorithm="giac")

[Out]

Done